home *** CD-ROM | disk | FTP | other *** search
- class State
- {
- var mcRef;
- var sState;
- function State(_mcRef, _bNormal)
- {
- this.mcRef = _mcRef;
- this.sState = "";
- if(_bNormal == false)
- {
- if(MainBroadcaster.Instance == null)
- {
- var _loc4_ = new MainBroadcaster();
- }
- MainBroadcaster.Instance.doAddListener(this);
- }
- else
- {
- if(Broadcaster.Instance == null)
- {
- var _loc5_ = new Broadcaster();
- }
- Broadcaster.Instance.doAddListener(this);
- }
- }
- function cleanUp()
- {
- Broadcaster.Instance.doRemoveListener(this);
- }
- function doAction()
- {
- this[this.sState]();
- }
- function setState(_sState)
- {
- if(this.sState != _sState)
- {
- this.sState = _sState;
- this.mcRef.gotoAndStop(_sState);
- }
- }
- function doPause()
- {
- this.mcRef.mcState.stop();
- }
- function doUnPause()
- {
- this.mcRef.mcState.play();
- }
- function stateFinished()
- {
- var _loc2_ = false;
- if(this.mcRef.mcState._currentframe >= this.mcRef.mcState._totalframes)
- {
- _loc2_ = true;
- }
- return _loc2_;
- }
- }
-